package com.example.weixin_01.test.design_model.proxy;

/**
 * @Author: zhenghuisheng
 * @Date: 2022/9/10 17:55
 * 商店购买,代理类只负责中转，不做具体的买卖，但是可以做增强
 */
public class Shop implements PhoneSell {

    private Factory factory = new Factory();

    @Override
    public Double sell(Integer amount) {
        //商家转发给厂家卖手机的信息
        double price = factory.sell(amount);
        //商家需要赚钱
        price = price +  price * 0.2;
        //返回需要的价钱
        return price;
    }
}
